package demo.openvc.com.openvcdemo;

import android.content.Intent;
import android.net.Uri;
import android.os.Parcelable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

public class ShowImageActivity extends AppCompatActivity {


    public static final String PHOTO_MIME_TYPE = "image/png";
    public static final String EXTRA_PHOTO_URI =
            "demo.openvc.com.openvcdemo.ShowImageActivity.extra.PHOTO_URI";
    public static final String EXTRA_PHOTO_DATA_PATH = "demo.openvc.com.openvcdemo.ShowImageActivity.extra.PHOTO_DATA_PATH";

    private ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show_image);
        imageView = findViewById(R.id.image_view);
        final Intent intent = getIntent();
        Uri mUri = intent.getParcelableExtra(EXTRA_PHOTO_URI);
        String mDataPath = intent.getStringExtra(EXTRA_PHOTO_DATA_PATH);
        imageView.setImageURI(mUri);

    }
}
